<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  name: 'App',
  created(){
    let user = localStorage.getItem('user');
    if(user){
      this.$store.dispatch('setUser', 
      JSON.parse(user))
    }
    this.$router.replace({
      path: '/home'
    })
  }
}
</script>
<style lang="scss">
  body, ul, li, p{
    margin: 0;
  }

  #app{
    display: flex;
    flex-flow: column;
    height: 100%;
  }
</style>
